package com.ciwong.epaper.util;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.ciwong.epaper.bean.NetWorkChangeEvent;
import com.ciwong.eventbus.EventBus;

public class NetWorkChangeBroadcastReceiver extends BroadcastReceiver {

    //    public static final String NET_CHANGE = "net_change";
//    //标记当前网络状态，0为无可用网络状态，1表示有。
//    public static final String NET_TYPE = "net_type";
    public int netType;

    @Override
    public void onReceive(Context context, Intent intent) {

        netType = VodNetUtil.getNetWorkState(context);

        EventBus.getDefault().post(new NetWorkChangeEvent(netType));

    }
}